/*
    esp.me -- MakeMe file to build the ESP library
 */

Me.load({
    blend: [ 'http', '?sqlite' ],

    targets: {
        esp: {
            configurable: true,
            depends:      [ 'libesp', 'mdb' ],
            uses:         [ 'sqlite' ],
        },

        mdb: {
            configurable: true,
            description: 'Embedthis MDB Database',
            uses:    [ 'sqlite' ],
        },

        'esp.h': {
            type: 'header',
            headers: [ '*.h' ],
        },

        libesp: {
            type: 'lib',
            depends: [ 'libhttp', 'libmpr-version', 'mdb' ],
            uses:    [ 'sqlite' ],
            sources: [ '*.c' ],
            exclude: /esp\.c/,
            headers: [ '*.h' ],
            ifdef:   [ 'esp' ],
        },

        espcmd: {
            pname: 'esp',
            path: '${BIN}/${settings.esp.name}${EXE}',
            type: 'exe',
            depends: [ 'libesp' ],
            sources: [ 'esp.c' ]
            platforms: [ 'local' ],
            ifdef:   [ 'esp' ],
            enable: 'me.settings.esp.cmd',
        },

        extras: {
            type: 'file',
            files: [ 'esp-compile.json', 'vcvars.bat' ],
            path: '${BIN}/',
            ifdef: [ 'esp' ],
        }
    }
})
